package com.java.concurrent.server;


import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.java.concurrent.mapper.CouponMapper;
import com.java.concurrent.pojo.Coupon;

import jakarta.annotation.Resource;

@RestController
@RequestMapping("/lock")
public class LockServer {

    @Resource CouponMapper couponMapper;

    @GetMapping("/")
    public void get() {
        List<Coupon> selectList = couponMapper.selectList(null);
        for (Coupon selectList2 : selectList) {
           System.out.println(selectList2.getRemainingCount());
        }
    }

}
